import './assets/base.scss';

import { createApp } from 'vue';
import App from './App.vue';
import router from './router';

//引入cookies
import VueCookies from 'vue-cookies';
//引入element plus
import ElementPlus from 'element-plus';
import 'element-plus/dist/index.css';
import '@/assets/base.scss';
//全局方法
import Verify from './utlis/Verify';
import Message from './utlis/Message';
import Request from './utlis/Request';
import Utils from './utlis/Utils';
import Confirm from './utlis/Confirm';
//引入store
import store from './store';
//图标 图标在附件中
import '@/assets/icon/iconfont.css';
// 全局组件
import Dialog from './components/Dialog.vue';
import Avatar from './components/Avatar.vue';
import Cover from './components/Cover.vue';
import DataList from './components/DataList.vue';
import noData from './components/noData.vue';
import ImageViewer from './components/ImageViewer.vue';
import EditorHtml from './components/EditorHtml.vue';
import EditorMarkdown from './components/EditorMarkdown.vue';
import CoverUpload from './components/CoverUpload.vue';
import AttachmentSelector from './components/AttachmentSelector.vue';





const app = createApp(App);
app.use(store)
app.use(router);
app.use(ElementPlus);
app.config.globalProperties.VueCookies = VueCookies;
app.config.globalProperties.globalInfo = {
  bodyWidth: 1100,
  avatarUrl: '/api/file/getAvatar/',
  imageUrl: '/api/file/getImage/'
};
app.config.globalProperties.Verify = Verify;
app.config.globalProperties.Message = Message;
app.config.globalProperties.Request = Request;
app.config.globalProperties.Utils = Utils;
app.config.globalProperties.Confirm = Confirm;


app.component("Dialog", Dialog)
app.component("Avatar", Avatar)
app.component("Cover", Cover)
app.component("DataList", DataList)
app.component("noData", noData)
app.component("ImageViewer", ImageViewer)
app.component("EditorMarkdown", EditorMarkdown)
app.component("EditorHtml", EditorHtml)
app.component("CoverUpload", CoverUpload)
app.component("AttachmentSelector", AttachmentSelector)







app.mount('#app');
